package com.orange.wwwapi.controller.coupon;

import com.orange.core.pojo.R;
import com.orange.core.pojo.entity.coupon.CouponCategory;
import com.orange.core.service.coupon.CouponCategoryService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 优惠券分类
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/couponCategory")
public class CouponCategoryController {

    private final CouponCategoryService couponCategoryService;

    /**
     * 查询
     */
    @PostMapping("/list")
    public R<List<CouponCategory>> list() {
        return R.ok(couponCategoryService.list());
    }
}
